package 算法.其他算法;

public class JZ17打印从1到最大的n位数 {
    public int[] printNumbers (int n) {
        // write code here
        //找到该n+1位数的最小数字
        int end = 1;
        for(int i = 1; i <= n; i++)
            end *= 10;
        int[] res = new int[end-1];
        for (int i = 1; i<end;i++)
                res[i-1] = i;
        return  res;
    }

}
